$OpenBSD: patch-configure,v 1.2 2012/12/27 12:02:33 gonzalo Exp $
Remove -Wredundant-decls which makes a lot of useless noise on
OpenBSD because of some problems in system headers.
(+ sndio support)
--- configure.orig	Wed Nov  7 09:46:17 2012
+++ configure	Wed Nov  7 19:18:57 2012
@@ -5,7 +5,7 @@
 check_cflags()
 {
 	check_cc_flag -std=gnu99 -pipe -Wall -Wshadow -Wcast-align -Wpointer-arith \
-		-Wwrite-strings -Wundef -Wmissing-prototypes -Wredundant-decls \
+		-Wwrite-strings -Wundef -Wmissing-prototypes \
 		-Wextra -Wno-sign-compare -Wformat-security
 
 	for i in -Wdeclaration-after-statement \
@@ -307,6 +307,16 @@ check_sun()
 	fi
 }
 
+check_sndio()
+{
+	case `uname -s` in
+	OpenBSD)
+		check_library SNDIO "" "-lsndio"
+		return $?
+	esac
+	return 1
+}
+
 check_waveout()
 {
 	case `uname -s` in
@@ -438,6 +448,7 @@ Optional Features: y/n
   CONFIG_ARTS     	ARTS                                            [auto]
   CONFIG_OSS      	Open Sound System                               [auto]
   CONFIG_SUN      	Sun Audio                                       [auto]
+  CONFIG_SNDIO    	Sndio                                           [auto]
   CONFIG_WAVEOUT  	Windows Wave Out                                [auto]
   USE_FALLBACK_IP	Use a specific IP for every unrecognized	[n]
                         input format. Currently set to FFMPEG.
@@ -499,6 +510,7 @@ check check_ao      CONFIG_AO
 check check_arts    CONFIG_ARTS
 check check_oss     CONFIG_OSS
 check check_sun     CONFIG_SUN
+check check_sndio   CONFIG_SNDIO
 check check_waveout CONFIG_WAVEOUT
 check check_roar    CONFIG_ROAR
 
@@ -535,6 +547,6 @@ CFLAGS="${CFLAGS} -DHAVE_CONFIG"
 
 makefile_vars bindir datadir libdir mandir exampledir
 makefile_vars CONFIG_CDIO CONFIG_FLAC CONFIG_MAD CONFIG_MIKMOD CONFIG_MODPLUG CONFIG_MPC CONFIG_VORBIS CONFIG_WAVPACK CONFIG_WAV CONFIG_MP4 CONFIG_AAC CONFIG_FFMPEG CONFIG_CUE
-makefile_vars CONFIG_ROAR CONFIG_PULSE CONFIG_ALSA CONFIG_AO CONFIG_ARTS CONFIG_OSS CONFIG_SUN CONFIG_WAVEOUT
+makefile_vars CONFIG_ROAR CONFIG_PULSE CONFIG_ALSA CONFIG_AO CONFIG_ARTS CONFIG_OSS CONFIG_SUN CONFIG_SNDIO CONFIG_WAVEOUT
 
 generate_config_mk
